﻿using MediatR;
using TaskProject.ErrorCode;

namespace TaskProject.Application.Command.BOM
{
    public class AddBOMCommand:IRequest<APIResult<int>>
    {
        /// <summary>
        /// BOM主题
        /// </summary>
        public string BOMtheme { get; set; }
        /// <summary>
        /// 版本
        /// </summary>
        public string BOMVersion { get; set; }
        /// <summary>
        /// 产品外键
        /// </summary>
        public int ProductId { get; set; }
        /// <summary>
        /// 日产量
        /// </summary>
        public int DayNum { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string BOMDesc { get; set; }
       
        public List<MaterialBOMInfo> Materials { get; set; }=new List<MaterialBOMInfo>();
        /// <summary>
        /// 状态（默认=0）
        /// </summary>
        public bool BOMState { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreteName { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreteDate { get; set; }
        /// <summary>
        /// 操作详情
        /// </summary>
        public string? CreateDesc { get; set; }
    }
    public class MaterialBOMInfo
    {
        /// <summary>
        /// 物料外键
        /// </summary>
        public int MaterialId { get; set; }
        /// <summary>
        /// 配件数量
        /// </summary>
        public int PartNum { get; set; }
        /// <summary>
        /// 损耗率
        /// </summary>
        public string LossRate { get; set; }
    }
}
